package com.xdtech.trans.vo;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.sql.Timestamp;

import com.xdtech.core.model.BaseItem;
import com.xdtech.core.orm.utils.BeanUtils;
import com.xdtech.trans.model.PriceConfig;

import com.xdtech.web.freemark.item.GridColumn;

/**
 * 
 * @author max.zheng
 * @create 2015-07-04 21:24:57
 * @since 1.0
 * @see
 */
public class PriceConfigItem extends BaseItem implements Serializable{
	private static final long serialVersionUID = 1L;
	private Long id;
	@GridColumn(title="首重(公斤)",width=100)
	private Double firstWeight;
	@GridColumn(title="首重价格(元)",width=100)
	private Double firstPrice;
	@GridColumn(title="续重(公斤)",width=100)
	private Integer  addWeight;
	@GridColumn(title="续重价格(元)",width=100)
	private Double addPrice;
	@GridColumn(title="中转网点",width=100)
	private String linkWebsite;
	@GridColumn(title="中转账户",width=100)
	private String linkWebsiteAccount;
	@GridColumn(title="是否目的站派件",width=100)
	private String isTargetDEliver;
	@GridColumn(title="中转(元)",width=100)
	private Double linkPrice;
	@GridColumn(title="派件(元)",width=100)
	private Double deliveryPrice;
	@GridColumn(title="续重派件(元)",width=100)
	private Double addDeliveryPrice;
	
	private Long linkWebsiteId;
	private Long linkWebsiteAccountid;
	

	public void setId(Long id) {
		this.id = id;
		addQuerys("id", id);
	}
	public Long getId() {
		return id;
	}
	
	public void setFirstWeight(Double firstWeight) {
		this.firstWeight = firstWeight;
		addQuerys("firstWeight", firstWeight);
	}
	public Double getFirstWeight() {
		return firstWeight;
	}
	
	public void setFirstPrice(Double firstPrice) {
		this.firstPrice = firstPrice;
		addQuerys("firstPrice", firstPrice);
	}
	public Double getFirstPrice() {
		return firstPrice;
	}
	
	public void setAddWeight(Integer  addWeight) {
		this. addWeight =  addWeight;
		addQuerys(" addWeight",  addWeight);
	}
	public Integer getAddWeight() {
		return  addWeight;
	}
	
	public void setAddPrice(Double addPrice) {
		this.addPrice = addPrice;
		addQuerys("addPrice", addPrice);
	}
	public Double getAddPrice() {
		return addPrice;
	}
	
	public void setLinkWebsite(String linkWebsite) {
		this.linkWebsite = linkWebsite;
		addQuerys("linkWebsite", linkWebsite);
	}
	public String getLinkWebsite() {
		return linkWebsite;
	}
	
	public void setLinkWebsiteAccount(String linkWebsiteAccount) {
		this.linkWebsiteAccount = linkWebsiteAccount;
		addQuerys("linkWebsiteAccount", linkWebsiteAccount);
	}
	public String getLinkWebsiteAccount() {
		return linkWebsiteAccount;
	}
	
	public void setIsTargetDEliver(String isTargetDEliver) {
		this.isTargetDEliver = isTargetDEliver;
		addQuerys("isTargetDEliver", isTargetDEliver);
	}
	public String getIsTargetDEliver() {
		return isTargetDEliver;
	}
	
	public void setLinkPrice(Double linkPrice) {
		this.linkPrice = linkPrice;
		addQuerys("linkPrice", linkPrice);
	}
	public Double getLinkPrice() {
		return linkPrice;
	}
	
	public void setDeliveryPrice(Double deliveryPrice) {
		this.deliveryPrice = deliveryPrice;
		addQuerys("deliveryPrice", deliveryPrice);
	}
	public Double getDeliveryPrice() {
		return deliveryPrice;
	}
	
	public void setAddDeliveryPrice(Double addDeliveryPrice) {
		this.addDeliveryPrice = addDeliveryPrice;
		addQuerys("addDeliveryPrice", addDeliveryPrice);
	}
	public Double getAddDeliveryPrice() {
		return addDeliveryPrice;
	}
	
	public Long getLinkWebsiteId()
	{
		return linkWebsiteId;
	}
	public void setLinkWebsiteId(Long linkWebsiteId)
	{
		this.linkWebsiteId = linkWebsiteId;
	}
	public Long getLinkWebsiteAccountid()
	{
		return linkWebsiteAccountid;
	}
	public void setLinkWebsiteAccountid(Long linkWebsiteAccountid)
	{
		this.linkWebsiteAccountid = linkWebsiteAccountid;
	}
	/**
	 * 根据model构建vo
	 * 
	 * @author max
	 * @return
	 */
	public static PriceConfigItem createItem(PriceConfig priceConfig) {
		PriceConfigItem priceConfigItem = new PriceConfigItem();
		BeanUtils.copyProperties(priceConfigItem, priceConfig);
		//自定义属性设置填充
		return priceConfigItem;
	}
	/**
	 * 根据model集合创建vo集合
	 * 
	 * @author max
	 * @return
	 */
	public static List<PriceConfigItem> createItems(List<PriceConfig> priceConfigs) {
		List<PriceConfigItem> priceConfigItems = new ArrayList<PriceConfigItem>();
		for (PriceConfig priceConfig : priceConfigs) {
			priceConfigItems.add(createItem(priceConfig));
		}
		return priceConfigItems;
	}
}
